package PMIRPConstDefs;


/**
 * Generated from IDL struct "MonitorInfo".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public final class MonitorInfoHelper
{
	private static org.omg.CORBA.TypeCode _type = null;
	public static org.omg.CORBA.TypeCode type ()
	{
		if (_type == null)
		{
			_type = org.omg.CORBA.ORB.init().create_struct_tc(PMIRPConstDefs.MonitorInfoHelper.id(),"MonitorInfo",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("monitor_id", PMIRPConstDefs.MonitorIdHelper.type(), null),new org.omg.CORBA.StructMember("mo_class", PMIRPConstDefs.MOClassNameHelper.type(), null),new org.omg.CORBA.StructMember("mo_instance_list", PMIRPConstDefs.MOInstanceListHelper.type(), null),new org.omg.CORBA.StructMember("monitor_granularity_period", PMIRPConstDefs.MonitorGranularityPeriodHelper.type(), null),new org.omg.CORBA.StructMember("threshold_info_list", PMIRPConstDefs.ThresholdInfoListHelper.type(), null),new org.omg.CORBA.StructMember("threshold_monitor_status", PMIRPConstDefs.MonitorStatusHelper.type(), null),new org.omg.CORBA.StructMember("event_type", PMIRPConstDefs.EventTypeHelper.type(), null)});
		}
		return _type;
	}

	public static void insert (final org.omg.CORBA.Any any, final PMIRPConstDefs.MonitorInfo s)
	{
		any.type(type());
		write( any.create_output_stream(),s);
	}

	public static PMIRPConstDefs.MonitorInfo extract (final org.omg.CORBA.Any any)
	{
		return read(any.create_input_stream());
	}

	public static String id()
	{
		return "IDL:PMIRPConstDefs/MonitorInfo:1.0";
	}
	public static PMIRPConstDefs.MonitorInfo read (final org.omg.CORBA.portable.InputStream in)
	{
		PMIRPConstDefs.MonitorInfo result = new PMIRPConstDefs.MonitorInfo();
		result.monitor_id=in.read_ulong();
		result.mo_class=in.read_string();
		result.mo_instance_list = PMIRPConstDefs.MOInstanceListHelper.read(in);
		result.monitor_granularity_period=in.read_ulong();
		result.threshold_info_list = PMIRPConstDefs.ThresholdInfoListHelper.read(in);
		result.threshold_monitor_status=PMIRPConstDefs.MonitorStatusHelper.read(in);
		result.event_type=in.read_string();
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream out, final PMIRPConstDefs.MonitorInfo s)
	{
		out.write_ulong(s.monitor_id);
		out.write_string(s.mo_class);
		PMIRPConstDefs.MOInstanceListHelper.write(out,s.mo_instance_list);
		out.write_ulong(s.monitor_granularity_period);
		PMIRPConstDefs.ThresholdInfoListHelper.write(out,s.threshold_info_list);
		PMIRPConstDefs.MonitorStatusHelper.write(out,s.threshold_monitor_status);
		out.write_string(s.event_type);
	}
}
